<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="b" uri="/bbs-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'blogMessageBoard.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/footer.css">
		<link rel="stylesheet" type="text/css" href="css/blog_header.css">

		<link rel="stylesheet" type="text/css"
			href="css/blog_center_right.css">
		<link rel="stylesheet" type="text/css" href="css/blog_top_head.css">
		<link rel="stylesheet" type="text/css" href="css/viewDiary.css">
		<link rel="stylesheet" type="text/css" href="css/pageStyleOne.css">
		<script type="text/javascript" src="js/parseIcon.js">
</script>
		<script type="text/javascript" src="js/jquery.js">
</script>
		<script type="text/javascript">
function show_hideShareEdit() {
	$(".hide_share_edit").css("display", "inline");
}
function close_hideShareEdit() {
	$(".hide_share_edit").css("display", "none");
}
</script>

	</head>

	<body onload="parseIcon()">
		<div class="tbody">
			<%@ include file="styleJsp/blog_top_head.jsp"%>
			<div class="table">
				<%@include file="styleJsp/blog_header.jsp"%>
				<div class="center">
					<div id="content">
						<div class="center_left">
							<div class="center_left_title">
								<b>日志</b>
								<a href="getRightListAction_getDiaryRightList?userId=${userId}">发表新日志</a>
							</div>
							<div class="center_left_context">
								<s:iterator value="diaryList" status="st">
									<s:if test="(#st.index+(pageNo-1)*10)==0">
										<div class="center_left_context1">
											<span class="center_left_context1-1"><s:property
													value="diaryName" /> </span>
											<span class="center_left_context1-2"><s:property
													value="diaryDate.toString().substring(0,16)" /> </span>
										</div>
										<div class="center_left_context2">
											<span class="center_left_context2-1"><s:property
													value="diaryContent" /> </span>
										</div>
										<div class="center_left_context3">
											<span class="center_left_context3-1"><a
												href="lookDiaryAction_lookDiaryEdit?diaryId=<s:property value="diaryId" />&userId=<s:property value='userId'/>">编辑</a>
											</span>
											<span class="center_left_context_spilt">|</span>
											<span class="center_left_context3-1"><a
												href="deleteDiaryAction_deleteFatherDiary?diaryId=<s:property value='diaryId'/>&userId=<s:property value='userId'/>">删除</a>
											</span>
											<span class="center_left_context_spilt">|</span>
											<span class="center_left_context3-1"><span
												class="center_left_context3-1-1"><a
													onclick="show_hideShareEdit()">分享</a> </span><span
												class="center_left_context3-1-0"><img
														src="images/shareIcon.png"> </span> </span>

										</div>
										<!-- 日志分享隐藏框 -->
										<div class="hide_share_edit">
											<form action="addShareAction?userId=${userId}" method="post">
												<input type="hidden" name="diaryId"
													value="<s:property  value='diaryId'/>" />
												<div class="hide_share_edit1">
													<span class="hide_share_edit1-1">分享</span>
													<a class="hide_share_edit1-2"
														onclick="close_hideShareEdit()"> </a>
												</div>
												<div class="hide_share_edit2">
													<span class="hide_share_edit2-1">分享说明:</span>
													<span class="hide_share_edit2-2">已有<s:property
															value='DiaryShareCount' />人分享</span>
												</div>
												<div class="hide_share_edit3">
													<b:editTable height="100" width="500" />
												</div>
												<div class="hide_share_edit4">
													<span class="hide_share_edit4-1"><a href="#"><s:property
																value='diaryName' /> </a> </span>
													<span class="hide_share_edit4-2"><a href="#"><s:property
																value='user.userName' /> </a> </span>
													<span class="hide_share_edit4-3"><s:property
															value='diaryContent' /> </span>
												</div>
												<div class="hide_share_edit5">
													<span class="hide_share_edit5-1"><input type="image"
															src="images/okly_btn.jpg" /> </span>
												</div>
											</form>
										</div>
										<div class="center_left_context4">
											<span>评论 (<s:property value="diaryReply" /> 个评论)</span>
										</div>
									</s:if>
									<s:else>
										<div class="center_left_context6">
											<div class="center_left_context6-1">
												<img src="files/<s:property value='user.userInfo.images'/>"
													style="width: 40; height: 40" />
											</div>
											<div class="center_left_context6-2">
												<div class="center_left_context6-2-1">
													<a href="#"><s:property value="user.userName" /> </a>
												</div>
												<div class="center_left_context6-2-2">
													<s:property value="diaryDate.toString().substring(0,16)" />
												</div>
												<div class="center_left_context6-2-4">
													<a
														href="deleteDiaryAction_deleteSonDiary?delId=<s:property value='diaryId'/>&diaryId=<s:property value='diary.diaryId'/>&userId=<s:property value='userId'/>">删除</a>
												</div>
												<div class="center_left_context6-2-5">
													<s:property value="diaryContent" />
												</div>
											</div>
										</div>
										<div class="center_left_context6-3"></div>
									</s:else>
								</s:iterator>
								<div class="center_left_context5-0">
									${pagination}
								</div>
								<div class="center_left_context5">
									<form
										action="replyDiaryAction?diaryId=<s:property value='diaryId'/>&userId=${userId}"
										method="post">
										<!-- 这里是diaryId，由Action传来。不是List的第一个元素，因为分页！ -->
										<div class="center_left_context5-1">
											<b:editTable height="100" width="560" classId="1" />
										</div>
										<div class="center_left_context5-2">
											<input type="image" src="images/replyDiary_btn.png" />
										</div>
									</form>
								</div>
							</div>

						</div>
					</div>
					<%@ include file="styleJsp/blog_center_right.jsp"%>
				</div>
				<%@ include file="styleJsp/footer.jsp"%>
			</div>
		</div>
	</body>
</html>
